using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BaHuan.Common;
using BaHuan.Entities;
using BaHuan.DataLayer;
/*
 * There are many processes that handle the flows of data
 * we call them business logic of a program.
 * For each of business logic process we create a class 
 * that handle for that process
 * 
 * */
namespace BaHuan.BusinessLayer
{
	
	public class BangCanDoiKeToanManagement
	{
	
		public ResultObj SaveNewBangCanDoiKeToan(BangCanDoiKeToan bangcandoiketoan)
        		{
			ResultObj result = new ResultObj();
			bangcandoiketoan.Id = -1;
			BangCanDoiKeToanDAO bangcandoiketoanDAO = new BangCanDoiKeToanDAO();
			result = bangcandoiketoanDAO.SaveBangCanDoiKeToan(bangcandoiketoan);
			
			return result;
		}
		
		public ResultObj UpdateBangCanDoiKeToan(BangCanDoiKeToan bangcandoiketoan)
        		{
			ResultObj result = new ResultObj();
			BangCanDoiKeToanDAO bangcandoiketoanDAO = new BangCanDoiKeToanDAO();
			result = bangcandoiketoanDAO.SaveBangCanDoiKeToan(bangcandoiketoan);
			
			return result;
		}
		
		public ResultObj DeleteBangCanDoiKeToan(BangCanDoiKeToan bangcandoiketoan)
        		{
			ResultObj result = new ResultObj();
			BangCanDoiKeToanDAO bangcandoiketoanDAO = new BangCanDoiKeToanDAO();
			result = bangcandoiketoanDAO.DeleteBangCanDoiKeToan(bangcandoiketoan);
			
			return result;
		}
		
		public ResultObj GetAllBangCanDoiKeToan( )
        		{
			ResultObj result = new ResultObj();
			BangCanDoiKeToanDAO bangcandoiketoanDAO = new BangCanDoiKeToanDAO();
			result = bangcandoiketoanDAO.GetAllBangCanDoiKeToan();
			
			return result;
		}
		
		public ResultObj GetBangCanDoiKeToanById(BangCanDoiKeToan bangcandoiketoan)
        		{
			ResultObj result = new ResultObj();
			BangCanDoiKeToanDAO bangcandoiketoanDAO = new BangCanDoiKeToanDAO();
			result = bangcandoiketoanDAO.GetAllBangCanDoiKeToanByID(bangcandoiketoan);
			
			return result;
		}
					
	}
}
